package io.nutz.nutzsite.module.sys.models;

import io.nutz.nutzsite.common.base.BaseModel;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.nutz.dao.entity.annotation.*;

import java.io.Serializable;
								
/**
 * 推送消息用户表 sys_msg_user
 * 
 * @author lrw
 * @date 2020-03-27
 */
@Table("sys_msg_user")
public class MsgUser implements Serializable {
	private static final long serialVersionUID = 1L;
	
			@Name
	@Prev(els = {@EL("uuid()")})
		@Column("id")
	@Comment("ID")
	@ColDefine(type = ColType.VARCHAR, width = 64)
	
	private String id;

			/** 消息ID */
	@Column("msgId")
	@Comment("消息ID")
	private String msgId;

			/** 用户名 */
	@Column("loginname")
	@Comment("用户名")
	private String loginname;

			/** 消息状态 */
	@Column("status")
	@Comment("消息状态")
	private Integer status;

			/** 读取时间 */
	@Column("readAt")
	@Comment("读取时间")
	private Long readAt;

			/** 操作人 */
	@Column("opBy")
	@Comment("操作人")
	private String opBy;

			/** 操作时间 */
	@Column("opAt")
	@Comment("操作时间")
	private Long opAt;

			/** 删除标记 */
	@Column("delFlag")
	@Comment("删除标记")
	private Integer delFlag;

	@One(field = "msgId")
    private Msg msg;
	
	
	public Msg getMsg() {
		return msg;
	}

	public void setMsg(Msg msg) {
		this.msg = msg;
	}

	public void setId(String id) 
	{
		this.id = id;
	}

	public String getId() 
	{
		return id;
	}

	public void setMsgId(String msgId) 
	{
		this.msgId = msgId;
	}

	public String getMsgId() 
	{
		return msgId;
	}

	public void setLoginname(String loginname) 
	{
		this.loginname = loginname;
	}

	public String getLoginname() 
	{
		return loginname;
	}

	public void setStatus(Integer status) 
	{
		this.status = status;
	}

	public Integer getStatus() 
	{
		return status;
	}

	public void setReadAt(Long readAt) 
	{
		this.readAt = readAt;
	}

	public Long getReadAt() 
	{
		return readAt;
	}

	public void setOpBy(String opBy) 
	{
		this.opBy = opBy;
	}

	public String getOpBy() 
	{
		return opBy;
	}

	public void setOpAt(Long opAt) 
	{
		this.opAt = opAt;
	}

	public Long getOpAt() 
	{
		return opAt;
	}

	public void setDelFlag(Integer delFlag) 
	{
		this.delFlag = delFlag;
	}

	public Integer getDelFlag() 
	{
		return delFlag;
	}

	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("msgId", getMsgId())
            .append("loginname", getLoginname())
            .append("status", getStatus())
            .append("readAt", getReadAt())
            .append("opBy", getOpBy())
            .append("opAt", getOpAt())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
